#ifndef __LIB_AGORA_ADMIN_RIGHTMANAGER_H__
#define __LIB_AGORA_ADMIN_RIGHTMANAGER_H__

#include <map>
#include "IRightManager.h"
//#include "IUser.h"
//#include "IChannel.h"
//#include "IChannelRight.h"
//#include "IServerRight.h"

class RightManager : public IRightManager
{
public:
	static IRightManager*		GetRightManager();
	const IChannelRight&		GetChannelRight(IUser* user, IChannel* channel);
	void						SetChannelRight(IUser* user, IChannel* channel, const bool canCreate, const bool canDelete, const bool canEdit, const bool canEditUser, const bool canTalk, const bool canWrite, const bool canKick, const bool canBan);

private:
	RightManager();
	static IRightManager*									_instance;
	std::map<IUser*, std::map<IChannel*, IChannelRight*>>	_userChannelRight;
	std::map<IUser*, IServerRight*>							_userServerRight;
};

#endif
